package com.fc.backingbeans;
	
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import javax.inject.Named;

@Named(value="loginBean")
public class LoginBean {
	public boolean login() {
		addMessage("you are logged in!");
		return true;
	}
	
	public boolean logout() {
		addMessage("you have logged out!");
		return true;
	}
	
	public void addMessage(String summary) {
		FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, summary,  null);
		FacesContext.getCurrentInstance().addMessage(null, message);
	}
}
                    